//
// Created by YeMingMing on 2024-03-05.
//

// 填空，计算 S=100+2/1 + 2/2 -2/3 + ...+2/98 - 2/99,结果保留5 位小数

#include <stdio.h>

double sum() {
    double result = 100;
    double sum = 0;
    for (int i = 1;i<100;i++) {
        if (i % 3 == 0) {
            sum -= 1.0/i;
        }else {
            sum += 1.0/i;
        }
    }
    return 100 + sum + 2;
}


int main() {
    printf("%.5lf",sum());
    return  0;
}
